Subject: Re: Armageddon in E!
From: [email-masked]
To: [email-masked]
Date: Fri, 23 Jul 93 19:03:51 PDT

>here are the solutions:
>
>When you use AddTail, I am assuming you do something like
>this:
>
>AddTail([0,0,0,0,'Text']:ln)

    Exactly! Only 'text' is a variable from ReadStr (just found out about a
new ReadStr proc someone made that is _8_ times faster than E's!...gotta go
get it!) I am using AddTail(listv,[0,0,0,0,textvar]:ln) for it. 

>This will work perfectly under normal circumstances, but
>if you put it in a loop, it won't. This is because when
>the program is compiled, the memory in the square brackets
>is allocated as part of the program. So, if you call it
>several times it is the same piece of memory that you are
>changing. Make sense?

    I gotcha so far.

>To remedy this, use the New() function. Then you can
>allocate memory for as many nodes as you like. When you
>have finished, use the dispose function to get rid of the
>nodes.

    I get what your saying, but not so clear on how I would implement it. 
Would I do 'listv:=New(nodes*80)' (80 being for max chars in line) ?

>Problem 2:
>
>What you need to do is decide whether you are going to use
>a single message port or one for each window. When I do
>this, I find that one for each window is better. These
>ports are automatically created by Intuition when you open
>a window. You only need one wait4msg routine to handle all
>the windows.

    Great! This looks like exaclty what I need.  Not at all what the RKMs say
is the system friendly way, but should do the job very nicely, thank you!

>Find out the mp_sigbit of each window, then create the
>mask for that window using Shl(). When you OR these values
>together, you have a signal mask that will return to your
>program when any window sends a message. Like this:

>Hope this helps!

    Should work perfectly.  Will have to go try it before I venture out to our
counnty fair tonight! :-)

 / / /
/_/_/iZ

*-- The Gamma Quadrant --*

*-- GammaTag Version 2.8 --*
*-- Irony:  Millie Vanilli on a Karaoke machine...